﻿@model CodeFarmer.Model.Entities.User
@{
    ViewBag.Title = "用户登录 - 码农中国";
}

<script type="text/javascript">
    $(function () {
        $("#AhthenCode").bind("click", RefreshCode);
    });

    function RefreshCode() {
        $("#AhthenCode").attr("src", '@Url.Action("Generate", "AuthenCode")');
    }
</script>
@using (Html.BeginForm())
{
    <fieldset>
        <legend>
            <h3>
               登录到码农中国(锄禾日当午,Coding最辛苦)</h3>
        </legend>
        <div>
            <table>
                <tr>
                    <td>
                        用户名:
                    </td>
                    <td>@Html.TextBoxFor(m => m.UserName)
                    </td>
                </tr>
                <tr>
                    <td>
                        密码:
                    </td>
                    <td>@Html.PasswordFor(m => m.PassWord)
                    </td>
                </tr>
                <tr>
                    <td>
                        验证码:
                    </td>
                    <td>
                        @Html.TextBox("authencode")&nbsp;
                        <img id="AhthenCode" alt="验证码" style="cursor: pointer;" src="@Url.Action("Generate", "AuthenCode")"/>
                        <a href="javascript:void(0);" onclick="RefreshCode();return false;">看不清，换一张</a>
                    </td>
                </tr>
                <tr>
                    <td>记住我</td>
                    <td>
                        @Html.CheckBox("RememberMe")
                    </td>
                </tr>
            </table>
            <div>
                <input type="submit" value="登录" />
            </div>
        </div>
    </fieldset>
}

